package cn.lj.service.impl;

import cn.lj.dao.UserDao;
import cn.lj.pojo.User;
import cn.lj.service.UserService;
import cn.lj.util.MD5Utils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author lj
 * @Description: 用户业务层实现类
 * @date 2020-11-26 19:47
 * @QQ 851477108
 */

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    @Override
    public User checkUser(String username, String password) {
        return userDao.findByUsernameAndPassword(username, MD5Utils.code(password));
    }
}
